package org.nfIt.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.nfIt.dto.h5.ProductSkuDto;
import org.nfIt.entity.product.ProductSku;

import java.util.List;

/**
 * ClossName:ProductMapper
 * Pakage:org.nfIt.mapper
 * Description
 *
 * @Author L
 * @Create 2024/9/18 20:23
 * @Version 2023.1.3
 */
@Mapper
public interface ProductSkuMapper {

    //查询热销商品，根据sale_num查询前10条
    List<ProductSku> findProductSkuBySale();

    /**
     * 分页查询商品
     * @param productSkuDto 条件
     */
    List<ProductSku> findByPage(ProductSkuDto productSkuDto);

    /**
     * 根据skuId获取sku信息
     */
    ProductSku getById(Long skuId);

    //根据商品id获取sku信息
    List<ProductSku> findByProductId(Long productId);
}
